<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="node_modules/vue/dist/vue.js"></script>
</head>
<body>
<!--表单元素双向数据绑定-->
<!--获取和设置表单元素的值（双向绑定）-->
<div id="app" >
    <input type="text" v-model="message" @keyup.enter="getM">
    <button @click="update">苦丁与</button>
    <h3>{{message}}</h3>

</div>
<script>
    var app=new Vue({
        el:"#app",
        data:{
            message:"hello"
        },
        methods:{
            getM:function () {
                this.message = "傻人有傻福"
            },
            update:function () {
                this.message="kudingyu"
            }
        }
    })
</script>
</body>
</html>